import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

// 懒加载
// function component(path) {
//   // require.ensure 是 Webpack 的特殊语法，用来设置 code-split point
//   // （代码分块）
//   return (resolve) => {
//     require.ensure([path], () => {
//       resolve(require(path))
//     })
//   }
// }

/* 1.临时关闭所有验证 */
/*eslint-disable */
/*eslint-disable */

export default new Router({
    /* 2.临时关闭指定的验证规则 */
    /* eslint-disable global-require, import/no-dynamic-require */
    routes: [{
        path: '/',
        name: 'home',
        // component: require('page/Home'),
        // component: component('../page/Home/index.vue')
        component: resolve => require(['page/Home'], resolve),
    }],
    /* eslint-enable global-require, import/no-dynamic-require */
});
